<?php
Class Product {
//1. Properties
	private $_ID;
	private $_name;
	private $_price;
//2. Methods
	//constructor
	function Product() {
		if (isset($_POST['ID'])) {
			$this->setID($_POST['ID']);
		}	
		if (isset($_POST['name'])) {
			$this->setName($_POST['name']);
		}
		if (isset($_POST['price'])) {
			$this->setPrice($_POST[price]);
		}
	}
	//getter and setter
	public function getID() {
		return $this->_ID;
	}
	public function setID($ID) {
		$this->_ID = $ID;
	}
	public function getName() {
		return $this->_name;
	}
	public function setName($name) {
		$this->_name = $name;
	}
	public function getPrice() {
		return $this->_price;
	}
	public function setPrice($price) {
		$this->_price = $price;
	}
}
?>